/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class SmartElectricVehicle {
    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device || {};
        this.opts = opts || {};
        this._to = to;
    }

    get categoryCode() {
        return '040040011';
    }

    get categoryName() {
        return '\u667a\u80fd\u7535\u52a8\u8f66';
    }

    getEnduranceMileage(params) {
        return command({
            method: 'getEnduranceMileage',
            methodId: 'pZwpBgsI',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getGpsPosition(params) {
        return command({
            method: 'getGpsPosition',
            methodId: 'pUjL706z',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getOnceMileage(params) {
        return command({
            method: 'getOnceMileage',
            methodId: 'pDNVDQXn',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getOnceTime(params) {
        return command({
            method: 'getOnceTime',
            methodId: 'p1RY46y9',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSignalIntensity(params) {
        return command({
            method: 'getSignalIntensity',
            methodId: 'pGegeeJE',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'pgyAbPnM',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSearch(params) {
        return command({
            method: 'setSearch',
            methodId: 'pes4SRVR',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'ppbbd4aW',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default SmartElectricVehicle;
